import { sys_user_power } from "@prisma/client";
import { BaseEntity } from "../base.entity/base.entity";
import { Field, Int, ObjectType } from "@nestjs/graphql";
import { SysUserEntity } from "../sys.user.entity/sys.user.entity";
import { SysTestChapterEntity } from "../sys.test.chapter.entity/sys.test.chapter.entity";

@ObjectType()
export class SysUserPowerEntity extends BaseEntity implements sys_user_power {
    @Field(() => Int)
    sys_test_chapterId: number;

    @Field(() => Int)
    sys_userId: number;

    @Field(() => Date)
    start_time: Date;

    @Field(() => Date)
    end_time: Date;

    @Field(() => SysUserEntity, { nullable: true })
    sys_user?: SysUserEntity

    @Field(() => SysTestChapterEntity, { nullable: true })
    sys_test_chapter?: SysTestChapterEntity
}
